package com.xy.mapper.system;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xy.model.condition.system.RoleCondition;
import com.xy.model.po.system.RolePO;

import java.util.List;

public interface RoleMapper extends BaseMapper<RolePO> {

    /**
     * 列表查询
     *
     * @param condition
     * @return
     */
    List<RolePO> queryList(RoleCondition condition);

    int countList(RoleCondition condition);

    /**
     * 根据userId获取关联的角色信息
     *
     * @param userId
     * @return
     */
    List<RolePO> findByUserId(Long userId);
}
